package com.inscream.app.functionality;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TabHost;

import com.inscream.app.R;

public class InscreamTab extends TabActivity {
    TabHost tabHost;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_inscream_tab);

        tabHost = getTabHost();

        TabHost.TabSpec spec1 = tabHost.newTabSpec("Follower");
        // setting Title and Icon for the Tab
        spec1.setIndicator("About");
        Intent Intent1 = new Intent(this, AboutUs.class);
        spec1.setContent(Intent1);

        // Tab for tab2
        TabHost.TabSpec spec2 = tabHost.newTabSpec("Following");
        // setting Title and Icon for the Tab
        spec2.setIndicator("Contact");
        Intent Intent2 = new Intent(this, ContactUs.class);
        spec2.setContent(Intent2);
        tabHost.addTab(spec1); // Adding tab1
        tabHost.addTab(spec2); // Adding tab2

    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.inscream_tab, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }

}
